﻿using Common.Enums;

using GameCommon.Base;
using GameCommon.Manager;

using GameGraphics.Components;

namespace GameGraphics.Screens.CloudScreen
{
    public class CloudScreen : ScreenBase
    {
        private Texture background;

        private Texture layer1;

        private Texture layer2;

        public CloudScreen(IScreenChanger changer, object argument)
            : base(changer, argument)
        {
            this.Layer = 1;
        }

        public override ScreenEnum Screen
        {
            get
            {
                return ScreenEnum.CloudScreen;
            }
        }

        public override void LoadContent()
        {
            this.layer1 = new Texture("T_Bg", Managers.ContentManager.GetCloudTexture2D("layer1"));
            this.layer1.Layer = 2;


            this.layer2 = new Texture("T_Layer1", Managers.ContentManager.GetCloudTexture2D("layer2"));
            this.layer2.Layer = 3;

            this.background = new Texture("T_Layer2", Managers.ContentManager.GetCloudTexture2D("bg"));

            this.Animations.Add(new CloudMovement(this.layer1, this.layer2, this.background.Size));

            this.Components.Add(this.layer1);
            this.Components.Add(this.layer2);
            this.Components.Add(this.background);
        }
    }
}